package cn.zucc.edu.handyzucc.service.impl;

import cn.zucc.edu.handyzucc.dao.DormDao;
import cn.zucc.edu.handyzucc.entity.Dorm;
import cn.zucc.edu.handyzucc.service.DormService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DormServiceImpl implements DormService {
    @Autowired
    private DormDao dormDao;

    @Override
    public Dorm getDormById(Integer user_dorm) {
        return dormDao.getDormById(user_dorm);
    }

    @Override
    public List<Dorm> getDormsByBuilding(String dorm_building) {
        return dormDao.getDormsByBuilding(dorm_building);
    }

    @Override
    public List<Dorm> getAllDorms() {
        return dormDao.getAllDorms();
    }
}
